import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/basic_information/third_party_qualifications_entity.dart';

ThirdPartyQualificationsEntity $ThirdPartyQualificationsEntityFromJson(Map<String, dynamic> json) {
  final ThirdPartyQualificationsEntity thirdPartyQualificationsEntity = ThirdPartyQualificationsEntity();
  final String? certificateNum = jsonConvert.convert<String>(json['certificateNum']);
  if (certificateNum != null) {
    thirdPartyQualificationsEntity.certificateNum = certificateNum;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    thirdPartyQualificationsEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    thirdPartyQualificationsEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    thirdPartyQualificationsEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    thirdPartyQualificationsEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    thirdPartyQualificationsEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    thirdPartyQualificationsEntity.id = id;
  }
  final String? qualificationsBeginDate = jsonConvert.convert<String>(json['qualificationsBeginDate']);
  if (qualificationsBeginDate != null) {
    thirdPartyQualificationsEntity.qualificationsBeginDate = qualificationsBeginDate;
  }
  final String? qualificationsEndDate = jsonConvert.convert<String>(json['qualificationsEndDate']);
  if (qualificationsEndDate != null) {
    thirdPartyQualificationsEntity.qualificationsEndDate = qualificationsEndDate;
  }
  final String? qualificationsLevel = jsonConvert.convert<String>(json['qualificationsLevel']);
  if (qualificationsLevel != null) {
    thirdPartyQualificationsEntity.qualificationsLevel = qualificationsLevel;
  }
  final String? qualificationsName = jsonConvert.convert<String>(json['qualificationsName']);
  if (qualificationsName != null) {
    thirdPartyQualificationsEntity.qualificationsName = qualificationsName;
  }
  final String? thirdPartyCompanyId = jsonConvert.convert<String>(json['thirdPartyCompanyId']);
  if (thirdPartyCompanyId != null) {
    thirdPartyQualificationsEntity.thirdPartyCompanyId = thirdPartyCompanyId;
  }
  final String? thirdPartyCompanyName = jsonConvert.convert<String>(json['thirdPartyCompanyName']);
  if (thirdPartyCompanyName != null) {
    thirdPartyQualificationsEntity.thirdPartyCompanyName = thirdPartyCompanyName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    thirdPartyQualificationsEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    thirdPartyQualificationsEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    thirdPartyQualificationsEntity.updateDate = updateDate;
  }
  return thirdPartyQualificationsEntity;
}

Map<String, dynamic> $ThirdPartyQualificationsEntityToJson(ThirdPartyQualificationsEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['certificateNum'] = entity.certificateNum;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['qualificationsBeginDate'] = entity.qualificationsBeginDate;
  data['qualificationsEndDate'] = entity.qualificationsEndDate;
  data['qualificationsLevel'] = entity.qualificationsLevel;
  data['qualificationsName'] = entity.qualificationsName;
  data['thirdPartyCompanyId'] = entity.thirdPartyCompanyId;
  data['thirdPartyCompanyName'] = entity.thirdPartyCompanyName;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension ThirdPartyQualificationsEntityExtension on ThirdPartyQualificationsEntity {
  ThirdPartyQualificationsEntity copyWith({
    String? certificateNum,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? id,
    String? qualificationsBeginDate,
    String? qualificationsEndDate,
    String? qualificationsLevel,
    String? qualificationsName,
    String? thirdPartyCompanyId,
    String? thirdPartyCompanyName,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return ThirdPartyQualificationsEntity()
      ..certificateNum = certificateNum ?? this.certificateNum
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..qualificationsBeginDate = qualificationsBeginDate ?? this.qualificationsBeginDate
      ..qualificationsEndDate = qualificationsEndDate ?? this.qualificationsEndDate
      ..qualificationsLevel = qualificationsLevel ?? this.qualificationsLevel
      ..qualificationsName = qualificationsName ?? this.qualificationsName
      ..thirdPartyCompanyId = thirdPartyCompanyId ?? this.thirdPartyCompanyId
      ..thirdPartyCompanyName = thirdPartyCompanyName ?? this.thirdPartyCompanyName
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
